<?php 
include 'data/data.php';
$conn = new mysqli($config['ip'], $config['user'], $config['pass'], $config['data']);
$name=str_replace(' ', '', $_GET['search']);
?>
<html><head lang="en">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="keywords" content="H5 HTML5 H5游戏 HTML5游戏 小游戏 手机游戏 网页游戏 在线游戏 点击即玩 久乐游戏 久乐H5">
<meta name="description" content="久乐游戏是一个行业领先的H5在线游戏平台，玩游戏不再苦苦的等待下载，点击即玩。">
<title>与BT相关的游戏 - 久乐H5游戏平台</title>
<link rel="stylesheet" href="/public/styles/base.css">
    <link rel="stylesheet" href="/css/new.css">
<link rel="stylesheet" href="/styles/ranking.css">
</head>
<body class="bg00">
    <!--div.container 总外框  start-->
    <div class="z_container bg01">
        <!--div.z_min 内容区域 statr-->
        <div class="main">
            <section class="top_fexed">
                <div class="gnod">
                    <div class="gokb">
                                                    <a target="_top" href="/user/index.html">
                                <img src="/images/user_center/default_img.png" alt="">
                            </a>
                                            </div>
                    <div class="search newser">
                        <input type="text" id="search_ipt" placeholder="请输入搜索内容" autocomplete="on" class="left_input">
                        <input type="submit" id="search_btn" class="search_icon" value="">
                    </div>
                </div>
                <div class="sercahe">
                    <p>您搜索的“<span style="color:#FF0101"><?php echo $name; ?></span>”结果如下：</p>
                </div>
            </section>
            <div style="width: 100%;height: 8px;background: #f4f4f4"></div>
            <!--div.game_list 游戏列表  start-->
            <section class="game_list" style="height: auto;">
                <div id="slider">
                    <div class="slide_cont">
                        <ul>
   <?php  
$result = $conn->query("SELECT id, logo, name, renqi, xingji, jianjie, type FROM games WHERE userid LIKE '%$dl%' and name LIKE '%$name%' ORDER BY id DESC");
 
if ($result->num_rows > 0) {
    while($row = $result->fetch_assoc()) {
            if($row[xingji]=='1'){
      $xj='<i class="icons i_start1"></i>';
      }elseif($row[xingji]=='2'){
      $xj='<i class="icons i_start1"></i><i class="icons i_start1"></i>';
      }elseif($row[xingji]=='3'){
      $xj='<i class="icons i_start1"></i><i class="icons i_start1"></i><i class="icons i_start1"></i>';
      }elseif($row[xingji]=='4'){
      $xj='<i class="icons i_start1"></i><i class="icons i_start1"></i><i class="icons i_start1"></i><i class="icons i_start1"></i>';
      }elseif($row[xingji]=='5'){
      $xj='<i class="icons i_start1"></i><i class="icons i_start1"></i><i class="icons i_start1"></i><i class="icons i_start1"></i><i class="icons i_start1"></i>';
      }
      if($row[type]=='MV'){
      $cbx='满V版';
      }elseif($row[type]=='BT'){
      $cbx='超变版';
      }elseif($row[type]=='GM'){
      $cbx='GM版';
      }elseif($row[type]=='H5'){
      $cbx='H5版';
      }
        echo '<li>
    <section class="list_content">
        <div class="game_log relative">
            <a target="_top" href="/game/detail.html?game_id='.$row[id].'"><img src="'.$row[logo].'" width="100%" height="auto" alt="'.$row[name].'"></a>
        </div>
        <div class="game_info">
            <h3>
                <span class="hidden"><a target="_top" href="/game/detail.html?game_id='.$row[id].'" title="'.$row[name].'" style="color:#333333;">'.$row[name].$cbx.'</a></span>
                            </h3>
            <p style="margin:6px 0 5px 0;">
                <a target="_top" href="/game/detail.html?game_id=136">
                <span class="start_list fl">
                    '.$xj.'                </span>
                    <span class="" style="padding: 0 1px 0;color:#5398FD;font-size: 10px;"><span style="color: #666666;">人气：</span>'.$row[renqi].'万+</span>
                </a>
            </p>
            <a target="_top" href="/game/detail.html?game_id='.$row[id].'">
                <p>'.$row[jianjie].'</p>
            </a>
        </div>
        <div class="game_btn">
                            <a target="_top" onclick="countDownload(this,100)" style="background: #5398FD;" href="/game/detail.html?game_id='.$row[id].'" class="btn_blue">查看详情</a>
                    </div>
    </section>
</li>';
    }
}else{
   echo '';
}
?>   
           
                        </ul>
                    </div>
                </div>
            </section>
            <!--div.game_list 游戏列表  end-->
            <div class="footer_padding"></div>
        </div>
        <!--div.z_min 内容区域 end-->
    </div>
    <!--div.container 总外框  end-->
<!--footer 底部 start-->
<footer id="footer" class="z_footer" style="">
    <nav>
        <a target="_top" href="/index.html" style="margin-left: 2%;">
            <p class="img_1"><img src="/picture/home.png" alt=""></p>
            <p class="img_2"><img src="/picture/home1.png" alt=""></p>
            <span>首页</span>
        </a>
        <a target="_top" href="/game/type.html?tc=GM" >
            <p class="img_1"><img src="/picture/game.png" alt=""></p>
            <p class="img_2"><img src="/picture/game1.png" alt=""></p>
            <span>GM</span>
        </a>
        <a target="_top" href="/game/game.html?tc=rm" title=""  id="footer_nav_active">
            <p class="img_1"><img src="/picture/game.png" alt=""></p>
            <p class="img_2"><img src="/picture/game1.png" alt=""></p>
            <span>BT</span>
        </a>
        <a target="_top" href="/user/user.html" title="">
            <p class="img_1"><img src="/picture/user.png" alt=""></p>
            <p class="img_2"><img src="/picture/user1.png" alt=""></p>
            <span>我的</span>
        </a>
    </nav>
</footer>
<link href="/css/app.css" rel="stylesheet" type="text/css">
<div id="weixin_an" style="display: none">
    <div class="click_opacity"></div>
    <div class="to_btn">
        <span class="span1"><img src="/public/channel/click_btn.png"></span>
        <span class="span2"><em>1</em> 点击右上角<img src="/public/channel/menu_android.png">打开菜单</span>
        <span class="span2 android_open"><em>2</em> 选择<img src="/public/channel/android.png"></span>
        <span class="span2 android_open"><em>3</em> 重新登录账号充值</span>
    </div>
</div>

<!--二维码-->
<script src="/public/scripts/jquery-1.11.1.min.js"></script>
<script src="/public/scripts/jquery.qrcode.min.js"></script>

<!--<div class="qrcode_image">-->
<!--        <img src="/qrcode/game.html?addr=--><!--">-->
<!--</div>-->
<script>


    /**
     * 统计
     */

    // var is_weixin = (function(){return navigator.userAgent.toLowerCase().indexOf('micromessenger') !== -1})();
    // window.onload = function() {
    //     if (is_weixin) {
    //         $('#weixin_an').show();
    //     }
    // }
</script>

<script src="/public/scripts/jquery-1.11.1.min.js"></script>
<script src="/public/scripts/jquery.mobile.min.js"></script>
<script>
$(".game_list").css({height:'auto'});
$('#footer a:eq(2)').attr('id', 'footer_nav_active');
$(function(){
	var old_sch = 'BT';
	$('#search_btn').on('tap', function(){
		var v = $.trim($('#search_ipt').val());
		v = v.replace(/[\'\"\?`~\!\$\%\^\*\(\)\[\]\{\}\-\+\\]+/, '');
		$('#search_ipt').val(v);
		if( v == '' ) {
			alert('请输入游戏名称、拼音或关键字！');
			$('#search_ipt').focus();
			return false;
		}
		if( v == old_sch ) return false;
		location.href = '/game/search.html?search='+ encodeURIComponent(v);
	});
});
</script>

</body></html>